<template>
  <div
    class="h-44px bg-[#F8F8F8] flex items-center justify-center relative"
    :style="isMobile ? 'width:100%' : 'max-width:375px'"
  >
    <div class="absolute left-20px">
      <van-icon name="arrow-left" @click="router.go(-1)" />
    </div>
    <div class="">{{ title }}</div>
  </div>
</template>
<script setup>
import { useRoute, useRouter } from "vue-router";

const props = defineProps({
  isMobile: { type: Boolean, default: false },
});
const route = useRoute();
const router = useRouter();
const title = ref("");

watchEffect(() => {
  if (route.meta.title) {
    title.value = route.meta.title;
  }
});
</script>
<style scoped lang="scss"></style>
